package com.byit.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lxp
 */
@Data
@TableName("app_mail")
public class AppMail extends Model<AppMail> {

    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 接收者
     */
    @TableField("send_to")
    private String sendTo;

    /**
     * 发送者
     */
    @TableField("from_to")
    private String fromTo;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 跟新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 操作人Id
     */
    @TableField("operation_id")
    private Long operationId;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * url
     */
    @TableField("url")
    private String url;
    /**
     * 0.未删除 1.删除
     */
    @TableField("is_del")
    private Integer isDel;
    /**
     * 0.未删除 1.删除
     */
    @TableField("is_send")
    private Integer isSend;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AppMail{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", sendTo='" + sendTo + '\'' +
                ", fromTo='" + fromTo + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", operationId=" + operationId +
                ", content='" + content + '\'' +
                ", isDel=" + isDel +
                ", isSend=" + isSend +
                '}';
    }
}